package com.ruoyi.fapiao.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fapiao.mapper.ReimbursementDetailMapper;
import com.ruoyi.fapiao.domain.ReimbursementDetail;
import com.ruoyi.fapiao.service.IReimbursementDetailService;

/**
 * 报销单明细Service业务层处理
 * 
 * @author xxxmatata
 * @date 2025-05-19
 */
@Service
public class ReimbursementDetailServiceImpl implements IReimbursementDetailService 
{
    @Autowired
    private ReimbursementDetailMapper reimbursementDetailMapper;

    /**
     * 查询报销单明细
     * 
     * @param detailId 报销单明细主键
     * @return 报销单明细
     */
    @Override
    public ReimbursementDetail selectReimbursementDetailByDetailId(Long detailId)
    {
        return reimbursementDetailMapper.selectReimbursementDetailByDetailId(detailId);
    }

    /**
     * 查询报销单明细列表
     * 
     * @param reimbursementDetail 报销单明细
     * @return 报销单明细
     */
    @Override
    public List<ReimbursementDetail> selectReimbursementDetailList(ReimbursementDetail reimbursementDetail)
    {
        return reimbursementDetailMapper.selectReimbursementDetailList(reimbursementDetail);
    }

    /**
     * 新增报销单明细
     * 
     * @param reimbursementDetail 报销单明细
     * @return 结果
     */
    @Override
    public int insertReimbursementDetail(ReimbursementDetail reimbursementDetail)
    {
        return reimbursementDetailMapper.insertReimbursementDetail(reimbursementDetail);
    }

    /**
     * 修改报销单明细
     * 
     * @param reimbursementDetail 报销单明细
     * @return 结果
     */
    @Override
    public int updateReimbursementDetail(ReimbursementDetail reimbursementDetail)
    {
        return reimbursementDetailMapper.updateReimbursementDetail(reimbursementDetail);
    }

    /**
     * 批量删除报销单明细
     * 
     * @param detailIds 需要删除的报销单明细主键
     * @return 结果
     */
    @Override
    public int deleteReimbursementDetailByDetailIds(Long[] detailIds)
    {
        return reimbursementDetailMapper.deleteReimbursementDetailByDetailIds(detailIds);
    }

    /**
     * 删除报销单明细信息
     * 
     * @param detailId 报销单明细主键
     * @return 结果
     */
    @Override
    public int deleteReimbursementDetailByDetailId(Long detailId)
    {
        return reimbursementDetailMapper.deleteReimbursementDetailByDetailId(detailId);
    }
}
